package kr.hkit.androidcomplete03;

import kr.hkit.androidcomplete03.DomParser.Ch32AMainActivity;
import kr.hkit.androidcomplete03.DomParser.DGDomParse;
import kr.hkit.androidcomplete03.ETC.Ch33AMainActivity;
import kr.hkit.androidcomplete03.SQLite.Ch34AMainActivity;
import kr.hkit.androidcomplete03.ch20.Ch20AMainActivity;
import kr.hkit.androidcomplete03.ch21.Ch21AMainActivity;
import kr.hkit.androidcomplete03.ch22.Ch22AMainActivity;
import kr.hkit.androidcomplete03.ch23.Ch23AMainActivity;
import kr.hkit.androidcomplete03.ch25.Ch25AMainActivity;
import kr.hkit.androidcomplete03.ch26.Ch26AMainActivity;
import kr.hkit.androidcomplete03.ch27.Ch27AMainActivity;
import kr.hkit.androidcomplete03.ch28.Ch28AMainActivity;
import kr.hkit.androidcomplete03.ch29.Ch29AMainActivity;
import kr.hkit.androidcomplete03.ch30.Ch30AMainActivity;
import kr.hkit.androidcomplete03.ch31.Ch31AMainActivity;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class MainActivity extends ListActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		ArrayAdapter adapter = ArrayAdapter.createFromResource(this,
				R.array.chapter, android.R.layout.simple_list_item_1);
		setListAdapter(adapter);
	}

	protected void onListItemClick(ListView l, View v, int position, long id) {
		Intent intent = null;

		switch (position) {
		case 0:
			intent = new Intent(getApplication(), Ch20AMainActivity.class);
			break;

		case 1:
			intent = new Intent(getApplication(), Ch21AMainActivity.class);
			break;

		case 2:
			intent = new Intent(getApplication(), Ch22AMainActivity.class);
			break;

		case 3:
			intent = new Intent(getApplication(), Ch23AMainActivity.class);
			break;

		case 4:
			intent = new Intent(getApplication(), Ch25AMainActivity.class);
			break;

		case 5:
			intent = new Intent(getApplication(), Ch26AMainActivity.class);
			break;

		case 6:
			intent = new Intent(getApplication(), Ch27AMainActivity.class);
			break;

		case 7:
			intent = new Intent(getApplication(), Ch28AMainActivity.class);
			break;

		case 8:
			intent = new Intent(getApplication(), Ch29AMainActivity.class);
			break;

		case 9:
			intent = new Intent(getApplication(), Ch30AMainActivity.class);
			break;

		case 10:
			intent = new Intent(getApplication(), Ch31AMainActivity.class);
			break;

		case 11:
			intent = new Intent(getApplication(), Ch32AMainActivity.class);
			break;

		case 12:
			intent = new Intent(getApplication(), Ch33AMainActivity.class);
			break;
			
		case 13:
			intent = new Intent(getApplication(), Ch34AMainActivity.class);
			break;

		}

		startActivity(intent);

	}

}
